package Boundary;

import Auxiliary.Sequence_SplitInfo;
import Auxiliary.Sequence_StateObserver;
import DataView.Sequence_Error;
import Executor.Main;
import Interfaces.DividiEventi;
import Interfaces.ShowStateTablePart;
import Store.Row;
import Visualization.EventCondReactVis;
import Visualization.StateTableVis;

public class UpdateStateTable extends BaseBoundary 
{
	public StateTableVis currentST;
	public Sequence_StateObserver allSO;
	public EventCondReactVis currentEVCR;
	private ShowStateTablePart interfaccia = new ShowStateTablePart(this);
	public Main main;
	
	public UpdateStateTable(Main main)
	{
		this.main=main;
	}
	public void correct(Sequence_Error err) 
	{
		interfaccia.showMessage(err.getDescription());
	}
	public void mkUpdateStateTable(StateTableVis aStVis, Sequence_StateObserver aAllSO, EventCondReactVis evCondReact) 
	{
		currentST = aStVis;
		allSO=aAllSO;
		currentEVCR=evCondReact;
		main.updateProject.home.display(interfaccia.showStateTable() , false);
	}

	public void setST(StateTableVis aStVis) 
	{
		currentST=aStVis;
		interfaccia.showSTP();
	}

	public void selectUsedSO(Sequence_StateObserver aSoUsed) 
	{
		main.doSelectUsedSO(aSoUsed);
	}

	public void setEVCR(EventCondReactVis aEvcr) 
	{
		currentEVCR=aEvcr;
		interfaccia.display(new DividiEventi(this).showEVCR());
	}

	public void splitCR(Sequence_SplitInfo aSplitted) 
	{
		main.doSplitCR(aSplitted);
	}

	public void generateStates() 
	{
		main.doGenerateStates();
	}

	public void defineState(Row aRow, String aName) {
		main.doDefineState(aRow, aName);
	}

	public void splitCR() 
	{
		main.doSplitCR();
	}

	public void validateST() 
	{
		main.doValidateST();
	}
	public void close() 
	{
		main.doClose();
	}

}